<?php namespace App\Models;

class PageRow extends \Eloquent {
	protected $table = 'page_row';
	protected $softDelete = true;

	public function blocks()
	{
		return $this->hasMany("App\Models\PageBlock", "rowid");
	}

	public static function getMaxDisplayOrder($pageid)
	{
		return \DB::table('page_row')->where("pageid", $pageid)->max("displayorder");
	}
} 